<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MD_D1307 Real Time Clock Library: MD_DS1307 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="MajicDesigns_Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MD_D1307 Real Time Clock Library
   &#160;<span id="projectnumber">1.3</span>
   </div>
   <div id="projectbrief">Library to control DS1307 real time clock</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_m_d___d_s1307.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_m_d___d_s1307-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">MD_DS1307 Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;MD_DS1307.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a385d43616f4ea92356852e5a83fb5b3e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a385d43616f4ea92356852e5a83fb5b3e">MD_DS1307</a> ()</td></tr>
<tr class="separator:a385d43616f4ea92356852e5a83fb5b3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77e0cbcd07064a756dbf562de3217f6c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a77e0cbcd07064a756dbf562de3217f6c">MD_DS1307</a> (int sda, int scl)</td></tr>
<tr class="separator:a77e0cbcd07064a756dbf562de3217f6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Methods for object and hardware control.</div></td></tr>
<tr class="memitem:a094cf2b307045357c50b4d64a92420c7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a094cf2b307045357c50b4d64a92420c7">control</a> (uint8_t item, uint8_t value)</td></tr>
<tr class="separator:a094cf2b307045357c50b4d64a92420c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0ee54a31fcb1b0c81d5d8f37b8de597"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#ab0ee54a31fcb1b0c81d5d8f37b8de597">status</a> (uint8_t item)</td></tr>
<tr class="separator:ab0ee54a31fcb1b0c81d5d8f37b8de597"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Methods for RTC operations</div></td></tr>
<tr class="memitem:a13950bdfabeb406a1c53045406042126"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a13950bdfabeb406a1c53045406042126">readTime</a> (void)</td></tr>
<tr class="separator:a13950bdfabeb406a1c53045406042126"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad58f158fc2685e09d9ee5b6dd1dc1e29"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#ad58f158fc2685e09d9ee5b6dd1dc1e29">writeTime</a> (void)</td></tr>
<tr class="separator:ad58f158fc2685e09d9ee5b6dd1dc1e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b1f9684f4117a62f321e44b43fcf2a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a4b1f9684f4117a62f321e44b43fcf2a0">now</a> (void)</td></tr>
<tr class="separator:a4b1f9684f4117a62f321e44b43fcf2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05cff9941dcbbab0952cff4545570a35"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a05cff9941dcbbab0952cff4545570a35">isRunning</a> (void)</td></tr>
<tr class="separator:a05cff9941dcbbab0952cff4545570a35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Miscellaneous methods</div></td></tr>
<tr class="memitem:ad7535e324d52b2c4fee2810b0d556b8f"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#ad7535e324d52b2c4fee2810b0d556b8f">readRAM</a> (uint8_t addr, uint8_t *buf, uint8_t len)</td></tr>
<tr class="separator:ad7535e324d52b2c4fee2810b0d556b8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dcefcf779301467203d5faef1ff8d11"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a9dcefcf779301467203d5faef1ff8d11">writeRAM</a> (uint8_t addr, uint8_t *buf, uint8_t len)</td></tr>
<tr class="separator:a9dcefcf779301467203d5faef1ff8d11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ede82a093f3721371304fd806ff0cae"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a3ede82a093f3721371304fd806ff0cae">calcDoW</a> (uint16_t <a class="el" href="class_m_d___d_s1307.html#a8fb693d4e11be837647d57a455e56335">yyyy</a>, uint8_t <a class="el" href="class_m_d___d_s1307.html#afdabb79ca86dcdda1fa3c0a9499a6c02">mm</a>, uint8_t <a class="el" href="class_m_d___d_s1307.html#ab06a83fe6b531936a63663ff4638be0d">dd</a>)</td></tr>
<tr class="separator:a3ede82a093f3721371304fd806ff0cae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Public variables for reading and writing time data</div></td></tr>
<tr class="memitem:a8fb693d4e11be837647d57a455e56335"><td class="memItemLeft" align="right" valign="top"><a id="a8fb693d4e11be837647d57a455e56335"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a8fb693d4e11be837647d57a455e56335">yyyy</a></td></tr>
<tr class="memdesc:a8fb693d4e11be837647d57a455e56335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Year including the century. <br /></td></tr>
<tr class="separator:a8fb693d4e11be837647d57a455e56335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdabb79ca86dcdda1fa3c0a9499a6c02"><td class="memItemLeft" align="right" valign="top"><a id="afdabb79ca86dcdda1fa3c0a9499a6c02"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#afdabb79ca86dcdda1fa3c0a9499a6c02">mm</a></td></tr>
<tr class="memdesc:afdabb79ca86dcdda1fa3c0a9499a6c02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Month (1-12) <br /></td></tr>
<tr class="separator:afdabb79ca86dcdda1fa3c0a9499a6c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab06a83fe6b531936a63663ff4638be0d"><td class="memItemLeft" align="right" valign="top"><a id="ab06a83fe6b531936a63663ff4638be0d"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#ab06a83fe6b531936a63663ff4638be0d">dd</a></td></tr>
<tr class="memdesc:ab06a83fe6b531936a63663ff4638be0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Date of the month (1-31) <br /></td></tr>
<tr class="separator:ab06a83fe6b531936a63663ff4638be0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa12449bb9deeb1c028a78b8d88fcd9d6"><td class="memItemLeft" align="right" valign="top"><a id="aa12449bb9deeb1c028a78b8d88fcd9d6"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#aa12449bb9deeb1c028a78b8d88fcd9d6">h</a></td></tr>
<tr class="memdesc:aa12449bb9deeb1c028a78b8d88fcd9d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hour of the day (1-12) or (0-23) depending on the am/pm or 24h mode setting. <br /></td></tr>
<tr class="separator:aa12449bb9deeb1c028a78b8d88fcd9d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc2fc7eda056879055a21ea5e330b8cf"><td class="memItemLeft" align="right" valign="top"><a id="adc2fc7eda056879055a21ea5e330b8cf"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#adc2fc7eda056879055a21ea5e330b8cf">m</a></td></tr>
<tr class="memdesc:adc2fc7eda056879055a21ea5e330b8cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minutes past the hour (0-59) <br /></td></tr>
<tr class="separator:adc2fc7eda056879055a21ea5e330b8cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe062c069ffe7b41dad3bbe730785f21"><td class="memItemLeft" align="right" valign="top"><a id="afe062c069ffe7b41dad3bbe730785f21"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#afe062c069ffe7b41dad3bbe730785f21">s</a></td></tr>
<tr class="memdesc:afe062c069ffe7b41dad3bbe730785f21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seconds past the minute (0-59) <br /></td></tr>
<tr class="separator:afe062c069ffe7b41dad3bbe730785f21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a627a67e62dc862ea7ed8915621980783"><td class="memItemLeft" align="right" valign="top"><a id="a627a67e62dc862ea7ed8915621980783"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#a627a67e62dc862ea7ed8915621980783">dow</a></td></tr>
<tr class="memdesc:a627a67e62dc862ea7ed8915621980783"><td class="mdescLeft">&#160;</td><td class="mdescRight">Day of the week (1-7). Sequential number; day coding depends on the application and zero is an undefined value. <br /></td></tr>
<tr class="separator:a627a67e62dc862ea7ed8915621980783"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd3a8fed17d7e29e739f6149cd28227d"><td class="memItemLeft" align="right" valign="top"><a id="abd3a8fed17d7e29e739f6149cd28227d"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_m_d___d_s1307.html#abd3a8fed17d7e29e739f6149cd28227d">pm</a></td></tr>
<tr class="memdesc:abd3a8fed17d7e29e739f6149cd28227d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-zero if 12 hour clock mode and PM, always zero for 24 hour clock. Check the time and if &lt; 12 then check this indicator. <br /></td></tr>
<tr class="separator:abd3a8fed17d7e29e739f6149cd28227d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Core object for the <a class="el" href="class_m_d___d_s1307.html">MD_DS1307</a> library </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a385d43616f4ea92356852e5a83fb5b3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a385d43616f4ea92356852e5a83fb5b3e">&#9670;&nbsp;</a></span>MD_DS1307() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MD_DS1307::MD_DS1307 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Class Constructor</p>
<p>Instantiate a new instance of the class. One instance of the class is created in the libraries as the RTC object. </p>

</div>
</div>
<a id="a77e0cbcd07064a756dbf562de3217f6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77e0cbcd07064a756dbf562de3217f6c">&#9670;&nbsp;</a></span>MD_DS1307() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MD_DS1307::MD_DS1307 </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sda</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>scl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Overloaded Class Constructor (ESP8266 only)</p>
<p>Provides a way to assign custom SCL and SDA pins if the architecture supports them.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sda</td><td>Pin number for the SDA signal </td></tr>
    <tr><td class="paramname">scl</td><td>Pin number for the SCL signal </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3ede82a093f3721371304fd806ff0cae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ede82a093f3721371304fd806ff0cae">&#9670;&nbsp;</a></span>calcDoW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t MD_DS1307::calcDoW </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>yyyy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calculate day of week for a given date</p>
<p>Given the specified date, calculate the day of week.</p>
<dl class="section see"><dt>See also</dt><dd>Wikipedia <a href="https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week">https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">yyyy</td><td>year for specified date. yyyy must be &gt; 1752. </td></tr>
    <tr><td class="paramname">mm</td><td>month for the specified date where mm is in the range [1..12], 1 = January. </td></tr>
    <tr><td class="paramname">dd</td><td>date for the specified date in the range [1..31], where 1 = first day of the month. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>dow value calculated [1..7], where 1 = Sunday. </dd></dl>

</div>
</div>
<a id="a094cf2b307045357c50b4d64a92420c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a094cf2b307045357c50b4d64a92420c7">&#9670;&nbsp;</a></span>control()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MD_DS1307::control </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the control status of the specified parameter to the specified value.</p>
<p>The device has a number of control parameters that can be set through this method. The type of control action required is passed through the mode parameter and should be one of the defined control actions. The value that needs to be supplied on the control action required is one of the defined status values. Not all combinations of item and value are valid.</p>
<dl class="section see"><dt>See also</dt><dd>Software Overview section in the introduction for a table of valid combinations.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>one of the defined code request values. </td></tr>
    <tr><td class="paramname">value</td><td>value as one of the defined code status values. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a05cff9941dcbbab0952cff4545570a35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05cff9941dcbbab0952cff4545570a35">&#9670;&nbsp;</a></span>isRunning()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean MD_DS1307::isRunning </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compatibility function - Check if RTC is running</p>
<p>Wrapper for a HALT status check</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_m_d___d_s1307.html#ab0ee54a31fcb1b0c81d5d8f37b8de597">status()</a> method</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>true if running, false otherwise. </dd></dl>

</div>
</div>
<a id="a4b1f9684f4117a62f321e44b43fcf2a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b1f9684f4117a62f321e44b43fcf2a0">&#9670;&nbsp;</a></span>now()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MD_DS1307::now </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compatibility function - Read the current time</p>
<p>Wrapper to read the current time.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_m_d___d_s1307.html#a13950bdfabeb406a1c53045406042126">readTime()</a> method</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>no return value. </dd></dl>

</div>
</div>
<a id="ad7535e324d52b2c4fee2810b0d556b8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7535e324d52b2c4fee2810b0d556b8f">&#9670;&nbsp;</a></span>readRAM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t MD_DS1307::readRAM </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the raw RTC clock data</p>
<p>Read <em>len</em> bytes from the RTC clock starting at <em>addr</em> as raw data into the buffer supplied. The size of the buffer should be at least MAX_BUF bytes long (defined in the library cpp file).</p>
<p>Read address starts at 0.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_m_d___d_s1307.html#a9dcefcf779301467203d5faef1ff8d11">writeRAM()</a> method</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>starting address for the read. </td></tr>
    <tr><td class="paramname">buf</td><td>address of the receiving byte buffer. </td></tr>
    <tr><td class="paramname">len</td><td>number of bytes to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes successfully read. </dd></dl>

</div>
</div>
<a id="a13950bdfabeb406a1c53045406042126"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13950bdfabeb406a1c53045406042126">&#9670;&nbsp;</a></span>readTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MD_DS1307::readTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the current time into the interface registers</p>
<p>Query the RTC for the current time and load that into the library interface registers (yyyy, mm, dd, h, m, s, dow, pm) from which the data can be accessed.</p>
<dl class="section return"><dt>Returns</dt><dd>false if errors, true otherwise. </dd></dl>

</div>
</div>
<a id="ab0ee54a31fcb1b0c81d5d8f37b8de597"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0ee54a31fcb1b0c81d5d8f37b8de597">&#9670;&nbsp;</a></span>status()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t MD_DS1307::status </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Obtain the current setting for the specified parameter.</p>
<p>Any of the parameters that can be set from the <a class="el" href="class_m_d___d_s1307.html#a094cf2b307045357c50b4d64a92420c7">control()</a> method can be queried using this method. The code status value returned will be one of the defined values for the <a class="el" href="class_m_d___d_s1307.html#a094cf2b307045357c50b4d64a92420c7">control()</a> method for each specific code request parameter.</p>
<dl class="section see"><dt>See also</dt><dd>Software Overview section in the introduction for a table of valid combinations.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>one of the defined control request values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>one of the defined code status values or DS1307_ERROR if an error occurred. </dd></dl>

</div>
</div>
<a id="a9dcefcf779301467203d5faef1ff8d11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dcefcf779301467203d5faef1ff8d11">&#9670;&nbsp;</a></span>writeRAM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t MD_DS1307::writeRAM </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write the raw RTC clock data</p>
<p>Write <em>len</em> bytes of data in the buffer supplied to the RTC clock starting at <em>addr</em>. The size of the buffer should be at least <em>len</em> bytes long.</p>
<p>Write address starts at 8 (first 7 bytes are for clock registers).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_m_d___d_s1307.html#ad7535e324d52b2c4fee2810b0d556b8f">readRAM()</a> method</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>starting address for the write. </td></tr>
    <tr><td class="paramname">buf</td><td>address of the data buffer. </td></tr>
    <tr><td class="paramname">len</td><td>number of bytes to write. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes successfully written. </dd></dl>

</div>
</div>
<a id="ad58f158fc2685e09d9ee5b6dd1dc1e29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad58f158fc2685e09d9ee5b6dd1dc1e29">&#9670;&nbsp;</a></span>writeTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MD_DS1307::writeTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write the current time from the interface registers</p>
<p>Write the data in the interface registers (yyyy, mm, dd, h, m, s, dow, pm) as the current time in the RTC. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_m_d___d_s1307_8h.html">MD_DS1307.h</a></li>
<li>src/MD_DS1307.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_m_d___d_s1307.html">MD_DS1307</a></li>
    <li class="footer">Generated on Tue Jun 26 2018 07:52:39 for MD_D1307 Real Time Clock Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
